<?php

namespace VueRender\Schema;

use VueRender\Schema;

/**
 * slot组件
 */
class Slot extends Schema
{
    /**
     * @param string $name
     * @param mixed|null $children
     */
    public function __construct(string $name = "default", mixed $children = null)
    {
        $this->componentName = "slot";
        $this->prop("name",$name);
        $this->children($children);
    }

    /**
     * @param string $name
     * @return $this
     */
    public function name(string $name = "default"):static
    {
        return $this->prop("name",$name);
    }
}
